package net.uzen.office.photo.dao;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import net.uzen.office.article.model.Article;
import net.uzen.office.photo.model.Photo;
import net.uzen.office.photo.model.PhotoComment;
import net.uzen.office.photo.model.PhotoSet;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

public class PhotoDaoImpl extends SqlMapClientDaoSupport implements PhotoDao {

	@Override
	public boolean addToPhotoSet(Photo photo) {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public boolean createPhoto(Photo photo) {
		return (Integer) getSqlMapClientTemplate().insert("createPhoto", photo) > 0 ? true
				: false;
	}

	@Override
	public boolean createPhotoSet(PhotoSet photoSet) {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public boolean deleteFromPhotoSet(Photo photo) {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public boolean deletePhoto(Photo photo) {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public boolean deletePhotoSet(PhotoSet photoSet) {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public List<Photo> getPhotoList(Map<String, Object> requestMap) {
		// TODO Auto-generated method stub
		return null;
	}

	@SuppressWarnings("unchecked")
	@Override
	public List<PhotoSet> getPhotoSetList() {
		return (ArrayList<PhotoSet>) getSqlMapClientTemplate().queryForList(
				"photo.getPhotoSetList");
	}

	@Override
	public String modifyPhoto(Photo photo) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public boolean modifyPhotoSet(PhotoSet photoSet) {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public Photo getPhoto(Photo photo) {
		return null;
	}

	@Override
	public PhotoSet getPhotoSet(PhotoSet photoSet) {
		return null;
	}

	@Override
	public boolean createPhotoComment(PhotoComment comment) {
		int result = (Integer) getSqlMapClientTemplate().insert(
				"photo.createPhotoComment", comment);
		return result > 0 ? true : false;
	}

	@Override
	public boolean deletePhotoComment(PhotoComment comment) {
		return false;
	}

	@Override
	public boolean modifyPhotoComment(PhotoComment comment) {
		return false;
	}

	@SuppressWarnings("unchecked")
	@Override
	public List<PhotoComment> getPhotoCommentList(PhotoComment comment) {
		return (ArrayList<PhotoComment>) getSqlMapClientTemplate().queryForList(
				"photo.getPhotoCommentList", comment);
	}
}
